import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import CheckoutDetail from '../components/CheckoutDetail';
import * as appActions from '../actions/app';

function mapStateToProps(state) {
  return {
    checkout_info : state.checkout_info
  };
}

function mapDispatchToProps(dispatch) {
  return bindActionCreators(appActions, dispatch);
}

export default connect(mapStateToProps, mapDispatchToProps)(CheckoutDetail); //time动作绑定到了APP，作为APP的属性,因为APP组件中主要是操作